Skip to content

feat(mapper): allow to merge existing values by extracting identifiers #260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 18, 2025

Conversation

joelwurtz
Copy link
Member

This introduce the possibility to deep merge object with collections and fetching the correct value to update it instead of adding a new one into the collection

@joelwurtz joelwurtz force-pushed the feat/merge-existing-value-with-identifier branch 3 times, most recently from 745cb5b to 12a3e45 Compare April 6, 2025 17:26
@joelwurtz joelwurtz requested a review from Korbeil April 6, 2025 21:02
Copy link
Member

@Korbeil Korbeil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do think it adds a lot of complexity to Array transformers (from/to), would it be possible to add some kind of abstraction to separate the pure mapping part & the identifier/existing values handling in separate class / traits or whatever ?

@joelwurtz joelwurtz force-pushed the feat/merge-existing-value-with-identifier branch 2 times, most recently from 1151b7f to 98598c6 Compare April 16, 2025 15:48
@joelwurtz
Copy link
Member Author

I do think it adds a lot of complexity to Array transformers (from/to), would it be possible to add some kind of abstraction to separate the pure mapping part & the identifier/existing values handling in separate class / traits or whatever ?

Yeah but all of this is internal and it's only on implementation, i don't want to over abstract thing, as it may changes and other bugs may appear, we can always change it latter since it's internal, i first want feedback on using this feature before abstracting the code and public api is minimal on this (so it would not impact anything)

@joelwurtz joelwurtz force-pushed the feat/merge-existing-value-with-identifier branch from 98598c6 to 7355357 Compare April 16, 2025 15:52
@joelwurtz joelwurtz force-pushed the feat/merge-existing-value-with-identifier branch from 7355357 to b97fa96 Compare July 18, 2025 08:29
@joelwurtz joelwurtz merged commit 5d78b14 into main Jul 18, 2025
6 checks passed
@joelwurtz joelwurtz deleted the feat/merge-existing-value-with-identifier branch July 18, 2025 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants